package com.sinosoft.hydra.um.domain.permission;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

import org.hibernate.annotations.GenericGenerator;
/**
 * 统一定义id的entity基类.
 * 基类统一定义id的属性名称、数据类型、列名映射及生成策略.
 */
//JPA 基类的标识
@MappedSuperclass
public abstract class IdEntity implements Serializable{
	private static final long serialVersionUID = 1L;

   protected String id;

    @Id
    @Column(name = "ID")
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
}